package ar.com.vates.vspJava.capitulo5.ejercicio2;

public class EliminarValor implements Runnable {

	Thread t = new Thread();

	@Override
	public synchronized void run() {
		t.start();
		Contenedor c = new Contenedor();
		
		if(c.getNumero() != 0){
			c.EliminarNumero();
			
		}
		else{
			try {
				t.wait();
			} catch (InterruptedException e) {
				System.out.println(e);
			}			
		}
	}
}